-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tagging action #298
Add tagging action #298
Conversation
f37b647
to
9b83e41
Compare
I tested this with some |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we get to running this on the release call in civiform/civiform do we want to prevent this from manually being run in order to prevent them from getting out of sync?
.github/workflows/tag.yaml
Outdated
run: | | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
git config user.name "github-actions[bot]" | ||
git tag -a ${{ github.event.inputs.release_number }} -m "Release ${{ github.event.inputs.release_number }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git tag -a ${{ github.event.inputs.release_number }} -m "Release ${{ github.event.inputs.release_number }}" | |
git tag ${{ github.event.inputs.release_number }} --message="Release ${{ github.event.inputs.release_number }}" |
I had to look up the -a
since I hadn't used it. I'd remove it unless you found a reason it needs to be explicitly set. The docs say:
If -m or -F is given and -a, -s, and -u are absent, -a is implied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The -a
is the actual tag, and the -m
is a message for the tag. I have it slightly different here, but I guess it doesn't need to be so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would seem git tag -m
doesn't really work on its own, despite what it says here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it's git tag <tag> -m <whatever>
. I think I'll just remove the -m
and -a
entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, we still want the -m
or else it just fills it in with the commit message of the commit it's tagged on.
Is that a thing we can do? Might still be nice to have the option to run it manually in case things go sideways, but I don't know. It's pretty easy to delete a bad tag if we need to. |
7548556
to
1d1838d
Compare
.github/workflows/tag.yaml
Outdated
run: | | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
git config user.name "github-actions[bot]" | ||
git tag ${{ github.event.inputs.version }} -m "${{ github.event.inputs.version }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git tag ${{ github.event.inputs.version }} -m "${{ github.event.inputs.version }}" | |
git tag ${{ github.event.inputs.version }} --message="${{ github.event.inputs.version }}" |
Using the full arg name make it easier to understand at a glance.
I thought there was a trigger type that let use trigger it, but not in the ui. I might be remembering wrong. |
Ah yeah, there's https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_call, but I'm not sure if that works cross-repo. https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#repository_dispatch might also work. I'll take a look at those when I work on the civiform release action trigger. |
1d1838d
to
eadf265
Compare
Adds an action to tag the repo. Partially addresses civiform/civiform#4763